package org.design;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class Login extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.login);

		Button btn_login = (Button) findViewById(R.id.btn_login);

		btn_login.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				EditText editTextuserName = (EditText) findViewById(R.id.input_username);
				String usernameStr = editTextuserName.getText().toString().trim();

				if (usernameStr.equals("a")) {
					Intent loginIntent = new Intent(v.getContext(),
							Merchants.class);
					v.getContext().startActivity(loginIntent);
				}
			}
		});
	}

}